<?php
session_start();
$loginId=$_SESSION['loginid'];
$name=$_SESSION['name'];
$userType=$_SESSION['user_type'];
$typeScheme=$_SESSION['type_scheme'];

include("connection/connection.php");

$qrTanker="select * from tbl_dtls_q1_oh where id='$_REQUEST[var]'";
		$resTanker=mysql_query($qrTanker);
		$rowTanker=mysql_fetch_assoc($resTanker);
		$frm=$rowTanker['loc_id'];
		
		
		//print_r($rowTanker);
?>
<html>
<head>
<script language="javascript">
function setvalue_ncov()
{
var m=document.getElementById('status_ncov').checked=true;
document.getElementById('status_cov').disabled="disabled";
}
function setvalue_cov()
{
document.getElementById('status_cov').disabled=false;
}
</script>
</head>
<body>
 <div class="section_format">
<script type="text/javascript" src="js/jquery.js"></script>
  <form action="q1_sec2_update.php" method="post" name="sampleform" id="sampleform">
  <input type="hidden" name="oh_id" value="<?php echo $_REQUEST['var']; ?>" />
  <input type="hidden" name="pre_status_cov" value="<?php echo $rowTanker['status_covered'];  ?>" />
  <input type="hidden" name="frmId" id="frmId" value="<?php echo $frm;?>" />
	  <input type="hidden" name="loginId" id="loginId" value="<?php echo $loginId;?>" />
	  <input type="hidden" name="name" id="name" value="<?php echo $name;?>" />
	  <input type="hidden" name="userType" id="userType" value="<?php echo $userType;?>" />
	  <input type="hidden" name="typeScheme" id="typeScheme" value="<?php echo $typeScheme;?>" />
	   <input type="hidden" name="pre_exist_status" value="<?php echo $rowTanker['status_e_nt']; ?>" />
 	   

  <table border="1">
    
    <tr>
      <td colspan="2">&nbsp;<b>Habitation (MH/OH) Coverage status</b></td>
      </tr>
   
      <tr>
        <td>&nbsp;<b>HP number</b></td>
        <td><input type="text" name="hp_num" id="hp_num" size="30" value="<?php echo $rowTanker['HP'];?>"></td>
      </tr>
      <tr>
        <td>&nbsp;<b>SP number</b></td>
        <td><input type="text" name="sp_num" id="sp_num" size="30" value="<?php echo $rowTanker['SP'];?>"></td>
      </tr>
      <td width="400">&nbsp;<b>Actual Status at Site (E/NT)</b></td>
      <td width="400">&nbsp;<input type="radio" name="status_site" value="Existing"  checked="checked" onClick="setvalue_cov()"/>Existing&nbsp; <input type="radio" name="status_site" value="NON TRACABLE" <?php echo ($rowTanker['status_e_nt']!="Existing")?"checked='checked'":""; ?>  onClick="setvalue_ncov()"/> 
      Not Existing&nbsp;</td>
      </tr>
    <tr>
      <td>&nbsp;<b>Actual Status of Covered</b></td>
      <td>&nbsp;<input type="radio" name="status_cov" id="status_cov" value="1"  checked="checked" <?php echo ($rowTanker['status_e_nt']!="Existing")?"disabled='disabled'":""; ?> />Covered&nbsp; <input type="radio" name="status_cov" id="status_ncov" value="0" <?php echo ($rowTanker['status_covered']!="1")?"checked='checked'":""; ?> /> 
      Not Covered </td>
      </tr>
      <tr>
	    <td colspan="2" align="center"><input type="submit" value="EDIT" name="tanker_info" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px; font-weight:bold; background:#666666; color:#FFFFFF; width:140px; height:30px" onClick="view_validate()"></td>
  </tr>
  </table>
  </form>
  </div>
 </body>
 
  